************************
** Study 3 - Analyses **
************************

* setting directory
cd "C:\Users\bronc\Desktop\"

* load data
clear
use "C:\Users\bronc\Desktop\Study_3_dataset.dta"


*****************************
** Descprictive statistics **
*****************************
sum age

tab gender

gen non_hisp_white=1 if ethnicity==1 & hispanic==1
recode non_hisp_white(.=0)
tab non_hisp_white
drop non_hisp_white

tab partisan_group

sum facebook_item


*******************
** Main analyses **
*******************

* Republicans
ttest facebook_item == 5 if partisan_group==2

* Democrats
ttest facebook_item == 5 if partisan_group==0

* Independents/Other
ttest facebook_item == 5 if partisan_group==1

* ANOVA
anova facebook_item partisan_group if partisan_group!=1,
oneway facebook_item partisan_group, t sch


*************************
** Additional analyses **
*************************

sum survey_time, d

** Dropping respondents who answered the survey very fast
* Republicans
ttest facebook_item == 5 if partisan_group==2 & survey_time>119

* Democrats
ttest facebook_item == 5 if partisan_group==0 & survey_time>119

* Independents/Other
ttest facebook_item == 5 if partisan_group==1 & survey_time>119

* ANOVA
anova facebook_item partisan_group if partisan_group!=1 & survey_time>119,
oneway facebook_item partisan_group if survey_time>119, t sch
